<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Networks extends CI_Controller {

	public function __construct(){
		parent::__construct();

		// load helper
		$this->load->helper('url');
		$this->load->library('session');

		// load model
		$this->load->model("Network", '', TRUE);
	}	

	public function index(){

		$data['networks'] = $this->Network->getNetworks();


        $data['mainView'] = 'index';
        $data['controllerName'] = 'admin/networks';
        $this->load->view('admin/layouts/layout', $data);
	}

	public function edit($networkId, $networkName, $pubIdOrAppId, $passOrSecretKey, $ratio, $lockStatus)
	{
		$this->Network->update($networkId, $networkName, $pubIdOrAppId, $passOrSecretKey, $ratio, $lockStatus);
		redirect('/admin/Networks/index');
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */